class Token
{
public:
	virtual bool isOperator();
	virtual bool isOperand();
};

class Operator : Token
{
private:
	char value;

public:
	Operator() : value(NULL) {}
	Operator(char val) : value(val) {}
	~Operator() {}
	const Operator & operator=(const Operator op)
	{
		this->value = op.value;
		return *this;
	}
	bool operator==(const Operator &op) { if(op.value == this->value) return true; else return false; }

	bool isOperator() { return true; }
	bool isOperand() { return false; }
	char get() { return value; }
};

class Operand : Token
{
private:
	double value;

public:
	Operand() : value(NULL) {}
	Operand(double val) : value(val) {}
	~Operand() {}
	const Operand & operator=(const Operand op)
	{
		this->value = op.value;
		return *this;
	}
	bool operator==(const Operand &op) { if(op.value == this->value) return true; else return false; }

	bool isOperator() { return false; }
	bool isOperand() { return true; }
	double get() { return value; }
};